#include <stdio.h>
#include <vector>
#include <algorithm>
using std::swap;
using std::vector;

struct big_num
{
    vector<int> d;

    big_num() = default;

    big_num(int val)
    {
        int remain = val;
        while (remain)
        {
            d.push_back(remain % 10000);
            remain /= 10000;
        }
    }

    big_num operator+(const big_num &rhs) const
    {
        big_num r;
        if (rhs.d.size() > d.size())
        {
            r.d = rhs.d;
            int k = r.d.size();
            for (int i = 0; i < k; ++i)
            {
                r.d[i] += d[i];
                while (r.d[i] > 9999)
                {
                    if (i >= r.d.size() - 1)
                    {
                        r.d.push_back(1);
                    }
                    else
                        r.d[i + 1] += 1;
                    r.d[i] -= 10000;
                }
            }
        }
        else
        {
            r.d = d;
            int k = r.d.size();
            for (int i = 0; i < k; ++i)
            {
                r.d[i] += rhs.d[i];
                while (r.d[i] > 9999)
                {
                    if (i >= r.d.size() - 1)
                    {
                        r.d.push_back(1);
                    }
                    else
                        r.d[i + 1] += 1;
                    r.d[i] -= 10000;
                }
            }
        }
        return r;
    }

    operator bool()
    {
        for (const auto &x : d)
        {
            if (x)
                return true;
        }
        return false;
    }

    void output() const
    {
        auto i = d.rbegin();
        printf("%d", *i);
        fflush(stdout);
        ++i;
        for (; i != d.rend(); ++i)
        {
            printf("%04d", *i);
            fflush(stdout);
        }
    }
};

inline void swap(big_num &a, big_num &b)
{
    swap(a.d, b.d);
}

int bmain()
{
    (big_num(4181) + big_num(6765)).output();
    return 0;
}

int main()
{
    big_num a{1};
    big_num b{1};
    big_num c{0};
    a.d.reserve(300);
    b.d.reserve(300);
    c.d.reserve(300);
    int n;
    scanf("%d", &n);
    for (int i = 0; i < n; ++i)
    {
        a = b + c;
        // printf("%4d: %3d: ", i, a.d.size());
        // a.output();
        // printf("\n");
        c = b;
        b = a;
    }
    a.output();
    return 0;
}